<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
  <div class="form-group">
    <label class="control-label col-xs-12 col-sm-2">{:__('Product_name')}:</label>
    <div class="col-xs-12 col-sm-8">
      <input id="c-product_name" data-rule="required" class="form-control" name="row[product_name]" type="text"
             value="{$row.product_name|htmlentities}">
    </div>
  </div>
  <div class="form-group">
    <label class="control-label col-xs-12 col-sm-2">{:__('Place')}:</label>
    <div class="col-xs-12 col-sm-8">
      <input id="c-place" data-rule="required" class="form-control" name="row[place]" type="text"
             value="{$row.place|htmlentities}">
    </div>
  </div>
  <div class="form-group">
    <label class="control-label col-xs-12 col-sm-2">{:__('Color')}:</label>
    <div class="col-xs-12 col-sm-8">
      <input id="c-color" class="form-control" name="row[color]" type="text"
             value="{$row.color|htmlentities}">
    </div>
  </div>
  <div class="form-group">
    <label class="control-label col-xs-12 col-sm-2">{:__('Lines')}:</label>
    <div class="col-xs-12 col-sm-8">
      <input id="c-lines" class="form-control" name="row[lines]" type="text"
             value="{$row.lines|htmlentities}">
    </div>
  </div>
  <div class="form-group">
    <label class="control-label col-xs-12 col-sm-2">{:__('Surface')}:</label>
    <div class="col-xs-12 col-sm-8">
      <input id="c-surface" class="form-control" name="row[surface]" type="text"
             value="{$row.surface|htmlentities}">
    </div>
  </div>
  <div class="form-group">
    <label class="control-label col-xs-12 col-sm-2">{:__('Specs')}:</label>
    <div class="col-xs-12 col-sm-8">
      <input id="c-specs" class="form-control" name="row[specs]" type="text"
             value="{$row.specs|htmlentities}">
    </div>
  </div>
  <div class="form-group">
    <label class="control-label col-xs-12 col-sm-2">{:__('Cover_images')}:</label>
    <div class="col-xs-12 col-sm-8">
      <div class="input-group">
        <input id="c-cover_images" data-rule="required" class="form-control" size="50" name="row[cover_images]"
               type="text" value="{$row.cover_images|htmlentities}">
        <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-cover_images" class="btn btn-danger faupload"
                                  data-input-id="c-cover_images"
                                  data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
                                  data-multiple="true" data-preview-id="p-cover_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
          <span><button type="button" id="fachoose-cover_images" class="btn btn-primary fachoose"
                        data-input-id="c-cover_images" data-mimetype="image/*" data-multiple="true"><i
              class="fa fa-list"></i> {:__('Choose')}</button></span>
        </div>
        <span class="msg-box n-right" for="c-cover_images"></span>
      </div>
      <ul class="row list-inline faupload-preview" id="p-cover_images"></ul>
    </div>
  </div>
  <div class="form-group">
    <label class="control-label col-xs-12 col-sm-2">{:__('Effect_images')}:</label>
    <div class="col-xs-12 col-sm-8">
      <div class="input-group">
        <input id="c-effect_images" data-rule="required" class="form-control" size="50" name="row[effect_images]"
               type="text" value="{$row.effect_images|htmlentities}">
        <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-effect_images" class="btn btn-danger faupload"
                                  data-input-id="c-effect_images" data-maxcount="10"
                                  data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
                                  data-multiple="true" data-preview-id="p-effect_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
          <span><button type="button" id="fachoose-effect_images" class="btn btn-primary fachoose" data-maxcount="10"
                        data-input-id="c-effect_images" data-mimetype="image/*" data-multiple="true"><i
              class="fa fa-list"></i> {:__('Choose')}</button></span>
        </div>
        <span class="msg-box n-right" for="c-effect_images"></span>
      </div>
      <ul class="row list-inline faupload-preview" id="p-effect_images"></ul>
    </div>
  </div>
  <div class="form-group">
    <label class="control-label col-xs-12 col-sm-2">{:__('Product_design')}:</label>
    <div class="col-xs-12 col-sm-8">
      <dl class="fieldlist" data-name="row[product_design]" data-template="selectUploadTpl">
        <dd>
          <ins>名称</ins>
          <ins>图片</ins>
        </dd>
        <dd>
          <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a>
        </dd>
        <textarea name="row[product_design]" class="form-control hide" cols="30" rows="5">{$row['designJson']}</textarea>
      </dl>
      <!--定义模板-->
      <script type="text/javascript" id="selectUploadTpl">
        {$getProductDesignTpl}
      </script>
      <!---->
    </div>
  </div>
  <div class="form-group">
    <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
    <div class="col-xs-12 col-sm-8">
      <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number"
             value="{$row.weigh|htmlentities}">
    </div>
  </div>
  <div class="form-group">
    <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
    <div class="col-xs-12 col-sm-8">

      <div class="radio">
        {foreach name="statusList" item="vo"}
        <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio"
                                               value="{$key}" {in name="key" value="$row.status" }checked{/in}
          /> {$vo}</label>
        {/foreach}
      </div>

    </div>
  </div>
  <div class="form-group">
    <label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
    <div class="col-xs-12 col-sm-8">
      <input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
             disabled data-use-current="true" name="row[create_time]" type="text" value="{$row.create_time}">
    </div>
  </div>
  <div class="form-group">
    <label class="control-label col-xs-12 col-sm-2">{:__('Update_user')}:</label>
    <div class="col-xs-12 col-sm-8">
      <input id="c-update_user" data-rule="required" class="form-control" name="row[update_user]" type="number"
             disabled value="{$row.update_user|htmlentities}">
    </div>
  </div>
  <div class="form-group layer-footer">
    <label class="control-label col-xs-12 col-sm-2"></label>
    <div class="col-xs-12 col-sm-8">
      <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
      <button type="reset" class="btn btn-danger btn-embossed">{:__('Reset')}</button>
    </div>
  </div>
</form>

<style>
  .name-input {
    width: 80px !important;
  }

  .plupload.btn {
    margin-left: 2px;
    border-radius: 3px;
  }

  .image-choose {
    margin: 0 3px;
  }

  .btn-remove {
    margin-right: 3px;
  }

  .btn-remove, .btn-dragsort {
    padding: 6px 12px;
  }

  .row:after {
    clear: both;
  }

  .row:before,
  .row:after {
    content: " ";
    display: table;
  }
</style>